<?php

class Nagrania extends Zend_Db_Table {

    protected $_name = 'nagrania';
    
    public function showAll($opiekun,$order="nazwisko",$okier="DESC") {
        //$select = $this->select()->where('opiekun=? AND active=1 AND usun=0', $opiekun);
        //return $select->order("$order $okier");
        
        $rows = $this->fetchAll("opiekun='$opiekun' AND active=1 AND usun=0", "$order $okier");
        return $rows;
        /*$adapter = new Zend_Paginator_Adapter_DbTableSelect($select);
        if ($adapter) {
            return $adapter;
        } else {
            throw new Zend_Exception('Nie można pokazać uczniów. Nie znaleziono rekordu!');
        }*/
    }

    

}
